<template>
	<scroll-view scroll-y="true" show-scrollbar="false" class="content">

		<view class="bg_box">
			<view class="bg01"></view>
			<view class="tea_box">
				<block v-for="(item, index) in teaList" :key="index">
				<view class="tea_list">
					<view class="tea_img">
						<!-- <image src="../../../static/tea01.png" mode="widthFix"></image> -->
					</view>
					<view class="text_box">
						<view class="name">{{item.name}}</view>
						<view class="time">{{item.time}}</view>
						<view class="time">数量：{{item.num}}</view>
					</view>
					<view class="arrow iconfont" :data-url="'/pages/index/mytea/teatime?id='+item.id" @click="gotopage">查看</view>
				</view>
				</block>
			</view>
			
		</view>
		
		
	
	</scroll-view>
</template>

<script>
export default {
	data() {
		return {
			
			teaList:[
			
			],
			
		};
	},
	onLoad(){
		let me = this;		       
		me.Net._get('cs_data',{id:me.id},(res)=>{
			if(res.code ==1){
				me.teaList=res.data
				
			  console.log(me.teaList)
			}
		});	
	},
	methods: {
		gotopage(e){
			let url = e.currentTarget.dataset.url;
			uni.navigateTo({
				url:url
			})
		}
		
	}
};
</script>

<style lang="scss">
page {
	height: 100%;
	padding-bottom: 0 !important;
	background-color: #fff;
}
.content {
	height: 100%;
	position: relative;
}



.bg_box{
	width: 100%;
	position: relative;
}

.tea_box{
	width: 100%;
	position: absolute;
	left: 0;
	top: 0;
}

.bg_box .bg01{
	width: 100%;
	height: 20vw;
	background-color: #4d726f;
	
}

.tea_list{
	width: 92%;
	padding: 3vw;
	box-sizing: border-box;
	margin: 0 auto 4%;
	display: flex;
	align-items: center;
	border: 1px solid #4d726f;
	border-radius: 2vw;
	background-color: #fff;
}

.tea_list .arrow{
	width: 16vw;
	height: 8vw;
	line-height: 8vw;
	border-radius: 8vw;
	text-align: center;
	background-color: #D20001;
	font-size: 3.5vw;
	color: #fff;
	margin-left: 3vw;
}

.tea_list .tea_img{
	width: 20vw;
}

.tea_list .tea_img image{
	width: 100%;
}

.tea_list .text_box{
	flex: 1;
	margin-left: 3vw;
}

.tea_list .text_box .name{
	font-size: 4vw;
	color: #333;
	font-weight: bold;
}

.tea_list .text_box .time{
	font-size: 3.2vw;
	color: #666;
	margin-top: 2vw;
}


	
	
</style>